package com.start.demo.job;

import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.start.demo.user.service.UserService;

public class PrintUsersJob extends QuartzJobBean {

	@Override
	protected void executeInternal(JobExecutionContext context)
			throws JobExecutionException {
//		JobDetail jobDetail = context.getJobDetail();
//		JobDataMap dataMap = jobDetail.getJobDataMap();// 任务所配置的数据映射表
//		UserService userService = (UserService) dataMap.get("userService");
//		System.out.println(userService.getUserById("1").getName());
		System.out.println("定时任务执行1...");

	}

}
